Skip to content

Conversation

@cte
Copy link
Collaborator

@cte cte commented Feb 11, 2025

Description

This make the diff less confusing for checkpoints created by Roo Code file modifications.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • This change requires a documentation update

How Has This Been Tested?

Checklist:

  • My code follows the patterns of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation

Additional context

Related Issues

Reviewers


Important

Add checkpoint functionality to save and restore project states, with UI support for viewing and managing checkpoints.

  • Behavior:
    • Add checkpoint parameter to say() in Cline.ts to include checkpoint metadata in messages.
    • Save initial checkpoint on first API request in recursivelyMakeClineRequests() in Cline.ts.
    • Add checkpointSave() and checkpointRestore() methods in Cline.ts for saving and restoring checkpoints.
  • UI Components:
    • Update ChatRow.tsx to display checkpoint messages using CheckpointSaved component.
    • Add CheckpointMenu in CheckpointMenu.tsx for checkpoint actions (diff, preview, restore).
    • Use checkpointSchema in CheckpointSaved.tsx to validate checkpoint metadata.
  • Models:
    • Add checkpoint field to ClineMessage in ExtensionMessage.ts to store checkpoint data.

This description was created by Ellipsis for d896078. It will automatically update as commits are pushed.

@changeset-bot
Copy link

changeset-bot bot commented Feb 11, 2025

⚠️ No Changeset found

Latest commit: d896078

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

const previousApiReqIndex = findLastIndex(this.clineMessages, (m) => m.say === "api_req_started")

// Save checkpoint if this is the first API request.
const isFirstRequest = this.clineMessages.filter((m) => m.say === "api_req_started").length === 0
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Taken from cline/cline@c29816c.

<Button variant="ghost" size="icon" onClick={onCheckpointDiff} title="View Diff">
<span className="codicon codicon-diff-single" />
</Button>
{!checkpoint?.isFirst && (
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we want to expose the "diff" action for the initial checkpoint, but LMK if you feel differently.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Agree

@cte cte merged commit be2e0b7 into cte/checkpoints-logging Feb 11, 2025
3 checks passed
@cte cte deleted the cte/store-initial-checkpoint branch February 11, 2025 19:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants